<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>老师端考试信息界面</title>
<link rel="stylesheet" href="../layui/css/layui.css">
</head>
<%
	Object id = session.getAttribute("user_id");
%>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header layui-bg-cyan">
			<div class="layui-logo">
				<img src="../img/hnzyy.png" alt="">
			</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<!-- <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="">控制台</a></li>
      <li class="layui-nav-item"><a href="">商品管理</a></li>
      <li class="layui-nav-item"><a href="">用户</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">其它系统</a>
        <dl class="layui-nav-child">
          <dd><a href="">邮件管理</a></dd>
          <dd><a href="">消息管理</a></dd>
          <dd><a href="">授权管理</a></dd>
        </dl>
      </li>
    </ul> -->
			<div
				style="text-align: center; color: white; font-size: 28px; line-height: 70px;">
				学生管理系统</div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="http://t.cn/RCzsdCq" class="layui-nav-img"> <%=id%>
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">基本资料</a>
						</dd>
						<dd>
							<a href="">安全设置</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a href="">退出</a></li>
			</ul>
		</div>
		<!-- style="background-color: rgb(70, 83, 100);" -->
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree layui-bg-black"
					lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed"><a class=""
						href="javascript:;">首页</a></li>
					<li class="layui-nav-item"><a href="javascript:;">学生管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">学生信息</a>
							</dd>
							<dd>
								<a href="javascript:;">学生考勤</a>
							</dd>
							<dd>
								<a href="javascript:;">学情警示</a>
							</dd>
							<!-- <dd><a href="">超链接</a></dd> -->
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">考试管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">试卷管理</a>
							</dd>
							<dd>
								<a href="javascript:;">题目管理</a>
							</dd>
							<dd>
								<a href="javascript:;">科目管理</a>
							</dd>
						</dl></li>
					<!-- <li class="layui-nav-item">
            <a href="javascript:;">考试管理</a>
            <dl class="layui-nav-child">
              <dd>
          <li class="layui-nav-item">
            <a href="javascript:;">考试信息</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">考试发布</a></dd>
              <dd><a href="javascript:;">考试信息查询</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">考试成绩</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">成绩发布</a></dd>
              <dd><a href="javascript:;">成绩查询</a></dd>
            </dl>
          </li>
          </dd>
          </dl>
          </li> -->
					<li class="layui-nav-item"><a href="javascript:;">成绩管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">成绩登记</a>
							</dd>
							<dd>
								<a href="javascript:;">成绩查看</a>
							</dd>
							<!-- <dd><a href="">超链接</a></dd> -->
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">课程管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">课程登记</a>
							</dd>
							<dd>
								<a href="javascript:;">课程查看</a>
							</dd>
							<!-- <dd><a href="">超链接</a></dd> -->
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">留言板</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">全部留言</a>
							</dd>
							<dd>
								<a href="javascript:;">我的留言</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">我的私信</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">未查看</a>
							</dd>
							<dd>
								<a href="javascript:;">已查看</a>
							</dd>
							<dd>
								<a href="javascript:;">已删除</a>
							</dd>
						</dl></li>
				</ul>
			</div>
		</div>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px;">
				<div class="site-demo-button" style="margin-bottom: 0;">
					<button class="layui-btn site-demo-active add" data-type="tabAdd">新增订单</button>
					<button class="layui-btn site-demo-active" data-type="tabDelete">删除：商品管理</button>
					<button class="layui-btn site-demo-active" data-type="tabChange">切换到：用户管理</button>
					<button class="layui-btn site-demo-active" data-type="tabDeleteAll">Del
						All</button>
				</div>
				<div class="layui-tab" lay-filter="demo" lay-allowclose="true">
					<ul class="layui-tab-title">
						<li class="layui-this" lay-id="11">管理用户</li>
						<li lay-id="22">用户信息</li>
						<li lay-id="33">权限分配</li>
						<li lay-id="44">商品管理</li>
						<li lay-id="55">订单管理</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<iframe src="student?m=page"
								style="display: block; width: 100%; height: 500px"
								frameborder="0" scrolling="yes"></iframe>
						</div>
						<div class="layui-tab-item">
							<iframe src="usertable.html"
								style="display: block; width: 100%; height: 500px"
								frameborder="0" scrolling="yes"> </iframe>
						</div>
						<div class="layui-tab-item">内容3</div>
						<div class="layui-tab-item">内容4</div>
						<div class="layui-tab-item">内容5</div>
					</div>
				</div>
			</div>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© layui.com - 底部固定区域
		</div>
	</div>
	<script src="../layui/layui.js"></script>
	<script>
		//JavaScript代码区域
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

			//触发事件
			//增加前进行判断
			$('.add').on('click', function() {
				var aobj = $(this);
				var id = aobj.attr("lay_id");
				var ids = $(".layui-tab-title li[lay-id]");
				var find = true;
				for (var i = 0; i < ids.length; i++) {
					if ($(ids[i]).attr("lay-id") == 55) {
						find = false;
						console.log(find);
						break;
					}
				}
				if (find == true) {
					element.tabAdd('demo', {
						title : '订单管理',
						content : '订单管理'
					})
				} else {
					element.tabChange('demo', '55');
				}
			})
			var active = {
				tabDelete : function(othis) {
					//删除指定Tab项
					element.tabDelete('demo', '44'); //删除：“商品管理”

					othis.addClass('layui-btn-disabled');
				},
				tabChange : function() {
					//切换到指定Tab项
					element.tabChange('demo', '22'); //切换到：用户管理
				},
				tabDeleteAll : function() {
					//删除所有
					var ids = $(".layui-tab-title li[lay-id]");
					console.log("del all..." + ids.length);
					$.each(ids, function(i, item) {
						console.log(i + "--" + item);
						var layid = $(item).attr("lay-id");
						element.tabDelete("demo", layid);
					})
				}
			};

			$('.site-demo-active').on('click', function() {
				var othis = $(this), type = othis.data('type');
				active[type] ? active[type].call(this, othis) : '';
			});

			$(function() {
				$("#main_left a").on("click", function() {
					var address = $(this).attr("href");
					$("iframe").attr("src", address);
				});
			});

		});
	</script>
</body>

</html>